package top.lishuoboy.boot02yaml.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lishuoboy
 * @date 2022/1/19 19:03
 */
@Data
@Component
@ConfigurationProperties(prefix = "prop")
public class ConfigProp {
    // 1、yaml字面量：单个的、不可再分的值。number、boolean、string、date、null
    private int integer_number;
    private double double_number;
    private boolean bool;
    private String str1;
    private String str2;
    private String str3;
    private String str4;
    private String userName;
    private Date date;
    private Object nullObj1;
    private Object nullObj2;

    // 2、yaml对象
    private User user1;
    private User user2;
    private Map map1;
    private Map map2;

    // 3、yaml数组
    private List list1;
    private List list2;
    private List<Map> list3;
//    private Set set;
//    private Object[] objArr;
}